<!DOCTYPE html>
<html>
<head>
	<title><#:C('sitename')#>-管理后台</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<include file="Pub:style"/>
	<!-- libraries -->
    <link href="<#$Theme['P']['root']#>/bootadmin/css/lib/uniform.default.css" type="text/css" rel="stylesheet" />
    <link href="<#$Theme['P']['root']#>/bootadmin/css/lib/select2.css" type="text/css" rel="stylesheet" />
    <link rel="stylesheet" href="<#$Theme['P']['root']#>/bootadmin/css/compiled/form-showcase.css" type="text/css" media="screen" />
	<link  href="<#$Theme['P']['root']#>/kindeditor/themes/default/default.css" type="text/css" rel="stylesheet">
<body>


<include file="Pub:Nav"/>
   <include file="Pub:Sidebar"/>

	<!-- main container -->
    <div class="content" style="height: 100%;">
   	<div class="container-fluid">
            <div id="pad-wrapper" class="form-page">
            
                <div class="row-fluid form-wrapper">
                 		<div class="span12">
                            <h4>编辑广告</h4>
                        </div>
                    <!-- left column -->
                    <div class="span8 column">
                        <form name="doad"  action="__URL__/savead"  method="post" enctype="multipart/form-data" >
                        <div class="alert span10" style="display: none;">
						  <span id="alertmsg"></span>
						</div>

                           <div class="field-box">
                                <label>广告位置:</label>
                             	 <div class="span8">
                                    <label class="radio">
                                        <input type="radio" name="ad_pos" id="status1" value="1" checked />
                                        	首页
                                    </label>
                                   
                                </div>                   
                            </div>
                             <div class="field-box">
                                <label>广告类别:</label>
                             	 <div class="span8">
                                    <label class="radio">
                                        <input type="radio" name="mode" value="1" <eq name="info['mode']" value="1">checked</eq> />
                                        	图片广告
                                    </label>
                                    <label class="radio">
                                        <input type="radio" name="mode" value="0" <eq name="info['mode']" value="0">checked</eq>/>
                                        		图文广告
                                    </label>
                                </div>                   
                            </div>
                            	<div class="field-box">
                                <label>标题:</label>
                                <input class="span8" type="text"  data-toggle="tooltip" data-trigger="focus" title="请输入标题" data-placement="right" name="title" id="title" value="<#$info['title']#>"/>
                            </div>
                            <div class="field-box">
                                <label>内容:</label>
                                <textarea rows="" cols="" class="span8" name="info"><#$info.info#></textarea>
                            </div>
                           	<div class="field-box">
                                <label>排序:</label>
                                <input class="span8" type="text"  data-toggle="tooltip" data-trigger="focus" title="请输入广告排序：数字越大越靠后" data-placement="right" name="ad_sort" id="ad_sort" value="<#$info['ad_sort']#>"/>
                            </div>
                             	<div class="field-box">
                                <label>广告图片:</label>
                               <input type="file"  name="img" id="upload"/>
                            </div>
                              <div class="field-box ">
								<input type="hidden" name="id" value="<#$info.id#>">
                                <input type="submit"   class="btn-glow primary " id="btn_save" value="保存信息">
                                &nbsp;
								<a class="btn-glow  " href="<#:U('index')#>">返回列表</a>
                            </div>
                        </form>
                    </div>

                    <!-- right column -->
                    <div class="span4 column pull-right">

                    </div>
                </div>
            	
            </div>
        </div>
    </div>


	<!-- scripts -->

	<script src="<#$Theme['P']['root']#>/kindeditor/kindeditor-min.js" type="text/javascript"></script>
	<script src="<#$Theme['P']['root']#>/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
 <script src="<#$Theme['P']['js']#>/jquery.js"></script>
    <script src="<#$Theme['P']['root']#>/bootadmin/js/bootstrap.min.js"></script>
    <script src="<#$Theme['P']['root']#>/bootadmin/js/theme.js"></script>
  <script src="<#$Theme['P']['root']#>/bootadmin/js/jquery.uniform.min.js"></script>
  <script src="<#$Theme['P']['root']#>/bootadmin/js/common.js"></script>
  <script>
		KindEditor.ready(function(K) {
			K.create('textarea[name="info"]', {
				autoHeightMode : true,
				items:['source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template',  'cut', 'copy', 'paste',
				        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
				        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
				        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
				        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
				        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 
				        'flash', 'media', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
				        'anchor', 'link', 'unlink', '|', 'about'],
				        afterUpload:false,
				        allowFlashUpload:false,
				        allowFileUpload:false,
				        allowImageUpload:false,
				        allowMediaUpload:false,
			});
		});
		
	
	</script>
  <script type="text/javascript">
                     

                        $(function () {
                        	
                            // add uniform plugin styles to html elements
                            $("input:checkbox, input:radio").uniform();

                        });
                    </script>
</body>
</html>